<?php

namespace App\Models\Finance;

use App\Models\BaseModel;

class Income extends BaseModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    public $table = 'income';
    public $dates = [];
    /**
     * Indicates if the model should be timestamped.
     * @var bool
     */
    public $timestamps = false;


    public function type()
    {
        return $this->belongsTo('App\Models\Finance\ManagementType', 'pid', 'id');
    }

    public function platform()
    {
        return $this->belongsTo('App\Models\Finance\Management', 'platform_id', 'id');
    }

    public function incomeExcel()
    {
        return $this->hasMany('App\Models\Finance\IncomeExcel', 'income_id', 'id');
    }
}
